<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta content="en" name="language">
	<title>enhance</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
	<link media="screen" href="../docutils-api.css" type="text/css" rel="stylesheet">

</head>

<body>

<div class="banner">
<img src="../images/gm-107x76.png" alt="GraphicMagick logo" width="107" height="76" />
<span class="title">GraphicsMagick</span>
<form action="http://www.google.com/search">
  <input type="hidden" name="domains" value="www.graphicsmagick.org" />
  <input type="hidden" name="sitesearch" value="www.graphicsmagick.org" />
<span class="nowrap"><input type="text" name="q" size="25" maxlength="255" />&nbsp;<input type="submit" name="sa" value="Search" /></span>
</form>
</div>


<div class="navmenu">
<ul>
  <li><a href="../index.html">Home</a></li>
  <li><a href="../project.html">Project</a></li>
  <li><a href="../download.html">Download</a></li>
  <li><a href="../README.html">Install</a></li>
  <li><a href="../Hg.html">Source</a></li>
  <li><a href="../NEWS.html">News</a> </li>
  <li><a href="../utilities.html">Utilities</a></li>
  <li><a href="../programming.html">Programming</a></li>
  <li><a href="../reference.html">Reference</a></li>
</ul>
</div>

<main id="enhance">
<h1 class="title">enhance</h1>
<p class="subtitle" id="methods-to-enhance-or-adjust-an-image">Methods to enhance or adjust an image</p>
<div class="contents topic" id="contents">
<p class="topic-title">Contents</p>
<ul class="simple">
<li><p><a class="reference internal" href="#contrastimage" id="id15">ContrastImage</a></p></li>
<li><p><a class="reference internal" href="#equalizeimage" id="id16">EqualizeImage</a></p></li>
<li><p><a class="reference internal" href="#gammaimage" id="id17">GammaImage</a></p></li>
<li><p><a class="reference internal" href="#levelimage" id="id18">LevelImage</a></p></li>
<li><p><a class="reference internal" href="#levelimagechannel" id="id19">LevelImageChannel</a></p></li>
<li><p><a class="reference internal" href="#modulateimage" id="id20">ModulateImage</a></p></li>
<li><p><a class="reference internal" href="#negateimage" id="id21">NegateImage</a></p></li>
<li><p><a class="reference internal" href="#normalizeimage" id="id22">NormalizeImage</a></p></li>
</ul>
</div>
<section id="contrastimage">
<h1><a class="toc-backref" href="#id15">ContrastImage</a></h1>
<section id="synopsis">
<h2>Synopsis</h2>
<pre class="literal-block">unsigned int ContrastImage( <a class="reference external" href="../api/types.html#image">Image</a> *image, const unsigned int sharpen );</pre>
</section>
<section id="description">
<h2>Description</h2>
<p>ContrastImage() enhances the intensity differences between the lighter and
darker elements of the image.  Set sharpen to a value other than 0 to
increase the image contrast otherwise the contrast is reduced.</p>
<p>The format of the ContrastImage method is:</p>
<pre class="literal-block">unsigned int ContrastImage( <a class="reference external" href="../api/types.html#image">Image</a> *image, const unsigned int sharpen );</pre>
<p>A description of each parameter follows:</p>
<dl class="simple">
<dt>image:</dt>
<dd><p>The image.</p>
</dd>
<dt>sharpen:</dt>
<dd><p>Increase or decrease image contrast.</p>
</dd>
</dl>
</section>
</section>
<section id="equalizeimage">
<h1><a class="toc-backref" href="#id16">EqualizeImage</a></h1>
<section id="id1">
<h2>Synopsis</h2>
<pre class="literal-block">unsigned int EqualizeImage( <a class="reference external" href="../api/types.html#image">Image</a> *image );</pre>
</section>
<section id="id2">
<h2>Description</h2>
<p>EqualizeImage() applies a histogram equalization to the image.</p>
<p>The format of the EqualizeImage method is:</p>
<pre class="literal-block">unsigned int EqualizeImage( <a class="reference external" href="../api/types.html#image">Image</a> *image );</pre>
<p>A description of each parameter follows:</p>
<dl class="simple">
<dt>image:</dt>
<dd><p>The image.</p>
</dd>
</dl>
</section>
</section>
<section id="gammaimage">
<h1><a class="toc-backref" href="#id17">GammaImage</a></h1>
<section id="id3">
<h2>Synopsis</h2>
<pre class="literal-block">MagickPassFail GammaImage( <a class="reference external" href="../api/types.html#image">Image</a> *image, const char *level );</pre>
</section>
<section id="id4">
<h2>Description</h2>
<p>Use GammaImage() to gamma-correct an image.  The same image viewed on
different devices will have perceptual differences in the way the
image's intensities are represented on the screen.  Specify individual
gamma levels for the red, green, and blue channels (e.g. &quot;1.0,2.2,0.45&quot;),
or adjust all three with a single gamma parameter.  Values typically range
from 0.45 to 2.6.</p>
<p>You can also reduce the influence of a particular channel with a gamma
value of 0.</p>
<p>The format of the GammaImage method is:</p>
<pre class="literal-block">MagickPassFail GammaImage( <a class="reference external" href="../api/types.html#image">Image</a> *image, const char *level );</pre>
<p>A description of each parameter follows:</p>
<dl class="simple">
<dt>image:</dt>
<dd><p>The image.</p>
</dd>
<dt>level:</dt>
<dd><p>Define the level of gamma correction.</p>
</dd>
</dl>
</section>
</section>
<section id="levelimage">
<h1><a class="toc-backref" href="#id18">LevelImage</a></h1>
<section id="id5">
<h2>Synopsis</h2>
<pre class="literal-block">unsigned int LevelImage( <a class="reference external" href="../api/types.html#image">Image</a> *image, const char *level );</pre>
</section>
<section id="id6">
<h2>Description</h2>
<p>LevelImage() adjusts the levels of an image by scaling the colors falling
between specified white and black points to the full available quantum
range. The parameters provided represent the black, mid (gamma), and white
points. The black point specifies the darkest color in the image. Colors
darker than the black point are set to zero. Mid point specifies a gamma
correction to apply to the image.  White point specifies the lightest color
in the image. Colors brighter than the white point are set to the maximum
quantum value.</p>
<p>The format of the LevelImage method is:</p>
<pre class="literal-block">unsigned int LevelImage( <a class="reference external" href="../api/types.html#image">Image</a> *image, const char *level );</pre>
<p>A description of each parameter follows:</p>
<dl class="simple">
<dt>image:</dt>
<dd><p>The image.</p>
</dd>
<dt>levels:</dt>
<dd><p>Specify the levels as a string of the form &quot;black/mid/white&quot;
(e.g. &quot;10,1.0,65000) where black and white have the range of 0-MaxRGB,
and mid has the range 0-10.</p>
</dd>
</dl>
</section>
</section>
<section id="levelimagechannel">
<h1><a class="toc-backref" href="#id19">LevelImageChannel</a></h1>
<section id="id7">
<h2>Synopsis</h2>
<pre class="literal-block">MagickPassFail LevelImageChannel( <a class="reference external" href="../api/types.html#image">Image</a> *image, const <a class="reference external" href="../api/types.html#channeltype">ChannelType</a> channel,
                                  const double black_point, const double mid_point,
                                  const double white_point );</pre>
</section>
<section id="id8">
<h2>Description</h2>
<p>LevelImageChannel() adjusts the levels of one or more channels by
scaling the colors falling between specified white and black points to
the full available quantum range. The parameters provided represent the
black, mid (gamma), and white points.  The black point specifies the
darkest color in the image. Colors darker than the black point are set to
zero. Mid point specifies a gamma correction to apply to the image.
White point specifies the lightest color in the image.  Colors brighter
than the white point are set to the maximum quantum value.</p>
<p>The format of the LevelImage method is:</p>
<pre class="literal-block">MagickPassFail LevelImageChannel( <a class="reference external" href="../api/types.html#image">Image</a> *image, const <a class="reference external" href="../api/types.html#channeltype">ChannelType</a> channel,
                                  const double black_point, const double mid_point,
                                  const double white_point );</pre>
<dl class="simple">
<dt>image:</dt>
<dd><p>The image.</p>
</dd>
<dt>channel:</dt>
<dd><p>Identify which channel to level: Red, Cyan, Green, Magenta,
Blue, Yellow, Opacity, or All.</p>
</dd>
<dt>black_point, mid_point, white_point:</dt>
<dd><p>Specify the levels where the black
and white points have the range of 0-MaxRGB, and mid has the range 0-10.</p>
</dd>
</dl>
</section>
</section>
<section id="modulateimage">
<h1><a class="toc-backref" href="#id20">ModulateImage</a></h1>
<section id="id9">
<h2>Synopsis</h2>
<pre class="literal-block">unsigned int ModulateImage( <a class="reference external" href="../api/types.html#image">Image</a> *image, const char *modulate );</pre>
</section>
<section id="id10">
<h2>Description</h2>
<p>ModulateImage() lets you control the brightness, saturation, and hue
of an image.  Modulate represents the brightness, saturation, and hue
as one parameter (e.g. 90,150,100).</p>
<p>The format of the ModulateImage method is:</p>
<pre class="literal-block">unsigned int ModulateImage( <a class="reference external" href="../api/types.html#image">Image</a> *image, const char *modulate );</pre>
<p>A description of each parameter follows:</p>
<dl class="simple">
<dt>image:</dt>
<dd><p>The image.</p>
</dd>
<dt>modulate:</dt>
<dd><p>Define the percent change in brightness, saturation, and
hue.</p>
</dd>
</dl>
</section>
</section>
<section id="negateimage">
<h1><a class="toc-backref" href="#id21">NegateImage</a></h1>
<section id="id11">
<h2>Synopsis</h2>
<pre class="literal-block">unsigned int NegateImage( <a class="reference external" href="../api/types.html#image">Image</a> *image, const unsigned int grayscale );</pre>
</section>
<section id="id12">
<h2>Description</h2>
<p>Method NegateImage negates the colors in the reference image.  The
Grayscale option means that only grayscale values within the image are
negated.</p>
<p>The format of the NegateImage method is:</p>
<pre class="literal-block">unsigned int NegateImage( <a class="reference external" href="../api/types.html#image">Image</a> *image, const unsigned int grayscale );</pre>
<p>A description of each parameter follows:</p>
<dl class="simple">
<dt>image:</dt>
<dd><p>The image.</p>
</dd>
</dl>
</section>
</section>
<section id="normalizeimage">
<h1><a class="toc-backref" href="#id22">NormalizeImage</a></h1>
<section id="id13">
<h2>Synopsis</h2>
<pre class="literal-block">unsigned int NormalizeImage( <a class="reference external" href="../api/types.html#image">Image</a> *image );</pre>
</section>
<section id="id14">
<h2>Description</h2>
<p>The NormalizeImage() method enhances the contrast of a color image by
adjusting the pixels color to span the entire range of colors available.</p>
<p>The format of the NormalizeImage method is:</p>
<pre class="literal-block">unsigned int NormalizeImage( <a class="reference external" href="../api/types.html#image">Image</a> *image );</pre>
<p>A description of each parameter follows:</p>
<dl class="simple">
<dt>image:</dt>
<dd><p>The image.</p>
</dd>
</dl>
</section>
</section>
</main>


<hr class="docutils">
<div class="document">
    <p><a href="../Copyright.html">Copyright</a> © GraphicsMagick Group 2002-2025<!--SPONSOR_LOGO--></p>
</div>

</main>
</body>
</html>
